package com.zys.entity;

import java.util.List;
import java.io.Serializable;

/**
 * 分页结果封装对象
 * 泛型 T: 需要分页的实体类
 */
public class PageResult<T> implements Serializable {
  private Long total;     // 总记录数
  private List<T> rows;   // 当前页结果

  public PageResult(Long total, List<T> rows) {
    this.total = total;
    this.rows = rows;
  }

  public Long getTotal() {
    return total;
  }

  public void setTotal(Long total) {
    this.total = total;
  }

  public List<T> getRows() {
    return rows;
  }

  public void setRows(List<T> rows) {
    this.rows = rows;
  }
}
